package top.lossingdawn.http.request.demo.config;

import okhttp3.OkHttpClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.TimeUnit;

/**
 * @author jiangyj
 * @version 1.0
 * @create 2021-07-27 14:14
 **/
@Configuration
public class OkHttpConfig {

    @Bean
    public OkHttpClient okHttpClient() {
        return new OkHttpClient().newBuilder().readTimeout(5000, TimeUnit.MILLISECONDS).build();
    }

}
